home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 1 / CU Amiga Magazine CD-ROM Special Edition (1995)(EMAP Images)(GB)[Issue 1995-11].iso / Aminet / biz / dbase / IntuiDex21.lha / Install_IntuiDex < prev    next >
Text File  |  1995-06-22  |  11KB  |  252 lines

  1. ; THIS IS THE INTUIDEX 2.0 INSTALLER SCRIPT.
  2. ; INTUIDEX IS COPYRIGHT 1995, JEFFERY C. MAY
  3. ;
  4. ; THIS VERSION CREATED: JAN 31, 1995
  5. ;
  6. ; ALTHOUGH THE COMMODORE INSTALLER USES SCRIPTS THAT VERY MUCH RESEMBLE
  7. ; LISP, I HAVE ENDEVORED TO MAKE THEM LOOK AS MUCH LIKE C AS POSSIBLE.
  8. ; (MAYBE THAT WAY I'LL REMEMBER HOW IT WORKS...:)
  9.  
  10.  
  11. ; SETUP SOME ERROR AND OTHER MESSAGES SO THAT THE CODE WILL BE A LITTLE
  12. ; EASIER TO READ...
  13. (
  14.     (set target-dir             "DH1:")
  15.     (set multiview              "sys:utilities/multiview")
  16.     (set amigaguide             "sys:utilities/amgiaguide")
  17.  
  18.     (set OtherAnnounce   (cat   "You are about to be asked to provide a "
  19.                                 "path to where you want IntuiDex to be "
  20.                                 "installed to.  If you wish to create a "
  21.                                 "drawer to put IntuiDex in, you must create "
  22.                                 "it with the \"Make New Drawer\" gadget.  "
  23.                                 "All neccessary subdirectories that are "
  24.                                 "needed will be created automatically."))
  25.  
  26.     (set AnnounceHelp    (cat   "   I need to know where you want IntuiDex "
  27.                                 "to be installed to.  The next window will "
  28.                                 "have in it a file requester in which you "
  29.                                 "can specify the location that you want "
  30.                                 "IntuiDex.\n"
  31.                                 "   I recommend that you put IntuiDex into the "
  32.                                 "same area of your hard disk that you put "
  33.                                 "your other applications, and NOT in the "
  34.                                 "system area. Grouping software like "
  35.                                 "this will make it easier to find it "
  36.                                 "later."))
  37.  
  38.     (set InstallIXEmulNew (cat  "IntuiDex requires at least version 40 of "
  39.                                 "the IXEmul.library.  You do not currently "
  40.                                 "have any version in your LIBS: "
  41.                                 "drawer.  I will now copy verison 40.4 into "
  42.                                 "your LIBS: drawer."))
  43.  
  44.     (set InstallIXEmulUp1 (cat  "IntuiDex requires at least version 40 of "
  45.                                 "the IXEmul.library.  Currently, you are "
  46.                                 "using version "))
  47.  
  48.     (set InstallIXEmulUp2 (cat  "I will now install version 40.4 of the "
  49.                                 "IXEmul.library into your LIBS: drawer"))
  50.  
  51.     (set IXEmulHelp (cat        "The IXEmul.library is a part of the GNU C "
  52.                                 "programming environment.  It was developed "
  53.                                 "by Markus Wild to permit his port of the "
  54.                                 "GNU C compiler to the Amiga.\n\n"
  55.                                 "The IXEmul.library is copyrighted under "
  56.                                 "the GNU General Public License.  This "
  57.                                 "means that I must make available the source "
  58.                                 "code to it.  Said source code is already "
  59.                                 "available on Aminet, in the dev/GCC "
  60.                                 "directory.  If you do not have 'net access, "
  61.                                 "please contact me if you are interested in "
  62.                                 "obtaining a copy of hte IXEmul.library "
  63.                                 "source code.\n\n"
  64.                                 "Please note that IntuiDex IS NOT copy"
  65.                                 "righted under the GNU GPL, and I WILL NOT "
  66.                                 "release the source code to it.  (Why would "
  67.                                 "you want to see it anyway? :)"))
  68.  
  69.  
  70.     (set intuitionNeeded (cat   "IntuiDex requires at least version 37 of "
  71.                                 "the Intuition Library.  If your system does "
  72.                                 "not have at least release 2.04 of the Amiga "
  73.                                 "operating system, IntuiDex will not operate."))
  74.  
  75.     (set gadtoolsNeeded (cat "  IntuiDex requires at least version 37 of "
  76.                                 "the GadTools Library.  If your system does "
  77.                                 "not have at least release 2.04 of the Amiga "
  78.                                 "operating system, IntuiDex will not operate."))
  79.  
  80.     (set aslNeeded       (cat   "IntuiDex requires at least version 37 of "
  81.                                 "the ASL Library.  If your system does "
  82.                                 "not have at least release 2.04 of the Amiga "
  83.                                 "operating system, IntuiDex will not operate."))
  84.  
  85.     (set graphicsNeeded (cat    "IntuiDex requires at least version 37 of "
  86.                                 "the Graphics Library.  If your system does "
  87.                                 "not have at least release 2.04 of the Amiga "
  88.                                 "operating system, IntuiDex will not operate."))
  89.  
  90.     (set utilityNeeded   (cat   "IntuiDex requires at least version 37 of "
  91.                                 "the Utility Library.  If your system does "
  92.                                 "not have at least release 2.04 of the Amiga "
  93.                                 "operating system, IntuiDex will not operate."))
  94.  
  95.     (set iconNeeded      (cat   "IntuiDex requires at least version 37 of "
  96.                                 "the Icon Library.  If your system does "
  97.                                 "not have at least release 2.04 of the Amiga "
  98.                                 "operating system, IntuiDex will not operate."))
  99.  
  100.     (set amigaguideNeeded (cat  "IntuiDex requires at least version 34 of "
  101.                                 "the AmigaGuide Library.  Your system does "
  102.                                 "not have the AmigaGuide Library, which was "
  103.                                 "included with release 3.0 and above of the Amiga "
  104.                                 "operating system.  "
  105.                                 "Note that the AmigaGuide system can be obtained "
  106.                                 "from Aminet, or any other source of PD and shareware "
  107.                                 "software."))
  108. )
  109.  
  110.  
  111. ; MAKE SURE THAT THEY'RE USING THE PROPER OPERATING SYSTEM...
  112. ; INTUIDEX ONLY WORKS WITH SYSTEMS THAT HAVE AT LEAST RELEASE 2.04
  113. ; (VERSION 37) OF THE AMIGA OS.
  114. (
  115.     (
  116.         (set IXEmulVer
  117.             (/ (getversion "libs:ixemul.library") 65536))
  118.  
  119.         (set intuitionVer
  120.             (/ (getversion "intuition.library" (resident)) 65536))
  121.  
  122.         (set gadtoolsVer
  123.             (/ (getversion "gadtools.library" (resident)) 65536))
  124.  
  125.         (set aslVer
  126.             (/ (getversion "asl.library" (resident)) 65536))
  127.  
  128.         (set graphicsVer
  129.             (/ (getversion "graphics.library" (resident)) 65536))
  130.  
  131.         (set utilityVer
  132.             (/ (getversion "libs:utility.library" (resident)) 65536))
  133.  
  134.         (set iconVer
  135.             (/ (getversion "icon.library" (resident)) 65536))
  136.  
  137.         (set amigaguideVer
  138.             (/ (getversion "libs:amigaguide.library") 65536))
  139.     )
  140. )
  141.  
  142.  
  143. ; NOW WE HAVE THE VERSION NUMBERS FOR ALL THE REQUIRED LIBRARIES.
  144. ; MAKE SURE THAT THEY'RE NEW ENOUGH TO WORK.
  145. (
  146.     (if (< intuitionVer 37)     ((message    intutionNeeded) (exit (quiet))))
  147.     (if (< gadtoolsVer 37)      ((message    gadtoolsNeeded) (exit (quiet))))
  148.     (if (< aslVer 37)           ((message    aslNeeded) (exit (quiet))))
  149.     (if (< graphicsVer 37)      ((message    graphicsNeeded) (exit (quiet))))
  150.     (if (< utilityVer 3)7       ((message    utilityNeeded) (exit (quiet))))
  151.     (if (< iconVer 37)          ((message    iconNeeded) (exit (quiet))))
  152.     (if (< amigaguideVer 34)    ((message    amigaguideNeeded) (exit (quiet))))
  153. )
  154.  
  155.  
  156.  
  157. ; GET THE LOCATION FROM THE USER WHERE TO PUT INTUIDEX
  158. ; NOTE THAT IF THE USER SELECTED "NOVICE" AS HIS USER LEVEL, THEN WE NEED
  159. ; TO SKIP THIS, AND JUST INSTALL INTUIDEX TO THE DH1: (WORK) PARTITION
  160. (
  161.     (if (> @user-level 0)
  162.         (
  163.             (message OtherAnnounce (help AnnounceHelp))
  164.             (set @default-dest  target-dir)
  165.             (set target-dir
  166.             (askdir     (prompt     "Where should I put IntuiDex?")
  167.                         (help       @askdir-help)
  168.                         (default    @default-dest)
  169.                         (newpath)
  170.                         (disk))
  171.             )
  172.         )
  173.     )
  174. )
  175.  
  176.  
  177. ; NOW WE'LL COPY THE FILES...
  178. ; THE VARIABLE @default-dest NOW HOLDS THE DIRECTORY WHERE WE'RE GOING
  179. ; TO BE PLACING ALL THE FILES.  NOW WE CAN COPY STUFF...
  180. (set  src (pathonly @icon))
  181. (copyfiles  (source src)
  182.             (dest   target-dir)
  183.             (infos)
  184.             (pattern "IntuiDex")
  185. )
  186. (copyfiles  (source src)
  187.             (dest   target-dir)
  188.             (infos)
  189.             (pattern "data")
  190. )
  191. (copyfiles  (source src)
  192.             (dest   target-dir)
  193.             (infos)
  194.             (pattern "help")
  195. )
  196. (copyfiles  (source src)
  197.             (dest   target-dir)
  198.             (infos)
  199.             (pattern "#?config")
  200. )
  201. (copyfiles  (source src)
  202.             (dest   target-dir)
  203.             (infos)
  204.             (pattern "mailmerge")
  205. )
  206.  
  207. ; NOW WE'LL MAKE SURE THAT A NEW ENOUGH VERSION OF THE IXEMUL.LIBRARY IS
  208. ; AVAILABLE.  IF NOT, WE'LL COPY OUR NEW VERSION INTO THE USER'S LIBS:
  209. ; DRAWER.
  210. ; THIS IS FOR A NEW INSTALLATION
  211. (if (= IXEmulVER 0)
  212.     (
  213.         (set libsrc  (cat src "\libs"))
  214.         (message InstallIXEmulNew (help IXEmulHelp))
  215.         (copyfiles  (source libsrc)
  216.                     (dest   "LIBS:")
  217.                     (all)
  218.         )
  219.         (set IXEmulVer
  220.             (/ (getversion "libs:ixemul.library") 65536))
  221.     )
  222. )
  223. ; THIS IS TO UPDATE AN EXISTING INSTALLATION.
  224. (if (< IXEmulVER 40)
  225.     (
  226.         (set IXEmsg (cat InstallIXEmulUp1 IXEmulVER "\n\n" InstallIXEmulUp2))
  227.         (set libsrc  (cat src "\libs"))
  228.         (message IXEmsg (help IXEmulHelp))
  229.         (copyfiles  (source libsrc)
  230.                     (dest   "LIBS:")
  231.                     (all)
  232.         )
  233.         (set IXEmulVer
  234.             (/ (getversion "libs:ixemul.library") 65536))
  235.     )
  236. )
  237.  
  238.  
  239. ; NOW, SET THE @default-dest VARIABLE TO POINT TO WHERE WE PUT THE STUFF
  240. ; SO THAT THE COMPLETION MESSAGE WILL BE RIGHT.
  241. (if (> @user-level 0) (set    @default-dest   target-dir))
  242.  
  243.  
  244. ; AT THE END NOW- LET'S BE NICE AND AUTOMATICALLY START THE ON-LINE HELP
  245. ; AMIGAGUIDE FILE IF WE CAN.  WE NEED TO CHECK AND SEE IF MULTIVIEW IS
  246. ; PRESENT IN THE SYS:UTILITIES DRAWER FIRST.
  247. (if (= (exists multiview (noreq)) 1)
  248.     (
  249.         (set AGCommand (cat multiview " \"" (tackon target-dir "help/IntuiDex.guide") "\""))
  250.         (run AGCommand)
  251.     )
  252. )